BEGIN{
    state["TX"]="Texas";
    state["PA"]="Pennsylvania";
    state["NV"]="Nevada";
    state["CA"]="California";
    state["AL"]="Alabama";

    print "---- Function: asort ----"
    total = asort(state, statedesc);
    for(i=1; i<=total; i++)
        print "index",i,"contains", statedesc[i];

    print "---- Function: asroti ----"
    total = asorti(state, stateabbr);
    for(i=1; i <= total; i++)
        print "index", i, "contains", stateabbr[i];
}
